package com.msa.msaportal.service.impl;

import com.msa.msaportal.dao.ITemplateDao;
import com.msa.msaportal.entity.PortalExample;
import com.msa.msaportal.entity.PortalheaderEntity;
import com.msa.msaportal.entity.Template;
import com.msa.msaportal.service.ITemplateService;

public class TemplateServiceImpl implements ITemplateService {
	
	private ITemplateDao templateDao;
	
	public ITemplateDao getTemplateDao() {
		return templateDao;
	}

	public void setTemplateDao(ITemplateDao templateDao) {
		this.templateDao = templateDao;
	}

	@Override
	public void save(Template template) {
		// TODO Auto-generated method stub
		templateDao.addTemplate(template);
	}

	@Override
	public void delete(String tresourse_Id) {
		// TODO Auto-generated method stub
		templateDao.delTemplate(tresourse_Id);
	}

	@Override
	public Template getObjByid(Integer tid) {
		// TODO Auto-generated method stub
		return templateDao.getObjById(tid);
	}

	@Override
	public void saveportal(PortalExample portal) {
		// TODO Auto-generated method stub
		templateDao.savePortal(portal);
	}


	@Override
	public Template findByTresourse_Id(String tresourse_Id) {
		// TODO Auto-generated method stub
		Template template = templateDao.findByTsourse_Id(tresourse_Id);
		return template;
	}

	@Override
	public void addHeadOrFoontToTmp(Template template) {
		// TODO Auto-generated method stub
		templateDao.addHeadOrFoontToTmp(template);
		
	}

	@Override
	public void updateTemplate(Template template) {
		
		templateDao.updateTemplate(template);
	}

/*	@Override
	public void saveHeaderToTemplate(PortalheaderEntity header) {
		// TODO Auto-generated method stub
		templateDao.saveHeaderToTemplate(header);
		
	}*/

}
